package com.lesso.cyg.sunflower.infra.assembler;

import com.lesso.cyg.sunflower.model.Employee;
import com.lesso.cyg.sunflower.pojo.dto.EmployeeDTO;
import com.lesso.cyg.sunflower.pojo.vo.EmployeeVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 员工对象转换器
 *
 * @author cyg
 * @since 2025-07-02
 */
@Mapper
public interface EmployeeAssembler {
    EmployeeAssembler INSTANCE = Mappers.getMapper(EmployeeAssembler.class);

    /**
     * DTO转实体
     */
    Employee dtoToEntity(EmployeeDTO dto);

    /**
     * 实体转DTO
     */
    EmployeeVO entityToVO(Employee employee);

    /**
     * 实体列表转DTO列表
     */
    List<EmployeeVO> entityListToVOList(List<Employee> employees);
}